package components;

import components.buttons.*;

import javax.swing.*;
import javax.swing.text.StyledEditorKit;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: admin
 * Date: 23.01.2006
 * Time: 15:06:31
 * To change this template use File | Settings | File Templates.
 */
public class ButtonPanel extends JToolBar {
    private StyledEditorKit.BoldAction actionFontBold;
	private StyledEditorKit.ItalicAction actionFontItalic;
	private StyledEditorKit.UnderlineAction actionFontUnderline;
    ExternalLink externalLinkButton;
    AnchorButton anchorButton;
    BRButton brButton;
    PButton pButton;
    ClearButton clearButton;
    BigButton bigButton;
    SmallButton smallButton;
    BoldButton boldButton;
    ItalicButton italicButton;
    UnderlineButton underlineButton;
    InsertImageButton insertImageButton;
    ChangeCardButton changeCardButton;

    public ButtonPanel() {
        /* Create shared actions */
		actionFontBold        = new StyledEditorKit.BoldAction();
		actionFontItalic      = new StyledEditorKit.ItalicAction();
		actionFontUnderline   = new StyledEditorKit.UnderlineAction();

        externalLinkButton = new ExternalLink();
        anchorButton = new AnchorButton();
        brButton = new BRButton();
        pButton = new PButton();
        clearButton = new ClearButton();
        bigButton = new BigButton();
        smallButton = new  SmallButton();
        boldButton = new BoldButton(actionFontBold);
        italicButton = new ItalicButton(actionFontItalic);
        underlineButton = new UnderlineButton(actionFontUnderline);
        insertImageButton = new InsertImageButton();
        changeCardButton = new ChangeCardButton();


//        add(changeCardButton, BorderLayout.EAST);
//        add(externalLinkButton,BorderLayout.EAST);
        add(new JToolBar.Separator());
        add(anchorButton, BorderLayout.EAST);
        add(brButton,BorderLayout.EAST);
        add(pButton,BorderLayout.EAST);
        add(clearButton,BorderLayout.EAST);
        add(new JToolBar.Separator());
        add(bigButton,BorderLayout.EAST);
        add(smallButton,BorderLayout.EAST);
        add(new JToolBar.Separator());
        add(boldButton,BorderLayout.EAST);
        add(italicButton,BorderLayout.EAST);
        add(underlineButton,BorderLayout.EAST);
        add(new JToolBar.Separator());
        add(insertImageButton,BorderLayout.EAST);
        setOrientation(JToolBar.VERTICAL);

        setFloatable(false);
    }
    public ExternalLink getExternalLinkButton()
    {

        return externalLinkButton;
    }
    public ChangeCardButton getChangeCardButton()
    {
        return changeCardButton;

    }
    public AnchorButton getAnchorButton() {
        return anchorButton;

    }
    public BRButton getBrButton()
    {

        return brButton;
    }
    public PButton getPButton()
    {
        return pButton;
    }
    public ClearButton getClearButton()
    {

         return clearButton;
    }
    public BigButton getBigButton()
    {

        return bigButton;
    }
    public SmallButton getSmallButton()
    {

        return smallButton;
    }
    public BoldButton getBoldButton()
    {

        return boldButton;
    }
    public ItalicButton getItalicButton()
    {

        return italicButton;
    }
    public UnderlineButton getUnderlineButton()
    {

        return underlineButton;
    }
    public InsertImageButton getInsertImageButton()
    {

        return insertImageButton;
    }
}
